package com.springboot.mybatis.common;

import java.util.List;

import com.github.pagehelper.Page;

public class PageDTO<T> {
    private Integer pageNum;
    private Integer pageSize;
    private Long total;
    private List<T> data;
    
    public PageDTO(){
        
    }
    public PageDTO(Page<T> page){
        this.pageNum = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.total = page.getTotal();
    }
    
    public Long getTotal() {
        return total;
    }
    public void setTotal(Long total) {
        this.total = total;
    }
    public List<T> getData() {
        return data;
    }
    public void setData(List<T> data) {
        this.data = data;
    }
    public Integer getPageNum() {
        return pageNum;
    }
    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }
    public Integer getPageSize() {
        return pageSize;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    
}
